import os
import conf
from google.appengine.ext.webapp import template

class CMS:
  def msgError(self, s, msgStr):
    t_val = {
       'msg': msgStr,
       'config': conf,
    }
    self.showForm(s, 'msg_error.html', t_val)

  def showForm(self, s, formName, params):
    path = os.path.join(os.path.dirname(__file__), formName)
    s.response.out.write(template.render(path, params))
